//
//  EditAddressFootView.m
//  Ginix
//
//  Created by fzq on 2025/3/3.
//

#import "EditAddressFootView.h"
@interface EditAddressFootView()

@property (nonatomic,strong) UIButton * enterBtn;

@end

@implementation EditAddressFootView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self setSubViewLayout];
    }
    return self;
}
-(void)setSubViewLayout{
    
    self.backgroundColor = UIColor.clearColor;
    [self addSubview:self.enterBtn];
    
}

-(void)enterBtnAAction{
    
    if (self.enterBtnBlock) {
        self.enterBtnBlock();
    }
}

-(UIButton *)enterBtn{
    
    if (!_enterBtn) {
        _enterBtn = [[UIButton alloc]initWithFrame:CGRectMake(20 * FMScaleX,  60* FMScaleX, WIDTH - 40 * FMScaleX,40 * FMScaleX)];
        [_enterBtn setTitle:@"保 存" forState:UIControlStateNormal];
        [_enterBtn setBackgroundColor:RDRGB(0xAD7D62)];
        [_enterBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
        _enterBtn.titleLabel.font = Medium(16);
        [_enterBtn setCornerRadius:10 * FMScaleX];
        [_enterBtn addTarget:self action:@selector(enterBtnAAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return _enterBtn;
}

@end
